Add gx review-bot scaffold for Codex PR review + guarded auto-merge#57
Closed
Add gx review-bot scaffold for Codex PR review + guarded auto-merge#57
Conversation
Add a first-class gx review-bot command that scaffolds a Codex-based PR review workflow, including structured schema output and optional auto-merge gating for agent branches. This keeps the agent-first push->PR->merge loop explicit and reproducible for main. Constraint: Must preserve branch-first workflow where agents push to their own branch before merge to base Rejected: Implicitly auto-enable reviews for every branch without head-prefix gate | would risk non-agent branches auto-merging Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep auto-merge gated by explicit label and head-branch prefix unless repository policy changes Tested: node --check bin/multiagent-safety.js; node --test test/install.test.js; npm test Not-tested: Live GitHub Actions run with real OPENAI_API_KEY/GUARDEX_BOT_TOKEN secrets
| console.log(`[${TOOL_NAME}] Protected base branches for bot: ${baseBranches.join(', ')}`); | ||
| console.log(`[${TOOL_NAME}] Auto-merge head-branch prefix: ${headBranchPrefix}`); | ||
| console.log(`[${TOOL_NAME}] Next steps:`); | ||
| console.log(` 1) Add secret '${options.apiKeySecret}' (Codex/OpenAI API key).`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gx review-botcommand to scaffold a Codex-based PR review workflowguardex-automergelabelmusafetyBasewhen running on an agent branch)Verification
node --check bin/multiagent-safety.jsnode --test test/install.test.jsnpm test